
#include "ServerApplication.h"
#include "TestEngine.h"
#include "XnccType.h"
#if defined(__CYGWIN__)
static const std::string CFG_STR_R = R"(
    {
    "PlatformLog": {
        "LogPath": "../log",
        "LogName": "stdout",
        "LogLevel": 4,
        "CoreId": 3,
        "RotateSize": 512
            },
    "Queues": [],
    "BusinessThreads": [
        {
            "Id": 1,
            "Name": "TimerTest",
            "Sub": [],
            "Pub": [],
            "CoreId": 3,
            "IOMultiMode": 2
        }
    ]
})";
#else
static const std::string CFG_STR_R = R"(
    {
    "PlatformLog": {
        "LogPath": "../log",
        "LogName": "stdout",
        "LogLevel": 4,
        "CoreId": 3,
        "RotateSize": 512
            },
    "Queues": [],
    "BusinessThreads": [
        {
            "Id": 1,
            "Name": "TimerTest",
            "Sub": [],
            "Pub": [],
            "CoreId": 3
        }
    ]
})";
#endif
xncc::Logger timer_log("timer_test", xncc::LOG_LEVEL::DEBUG);

int main(int argc, const char** argv)
{
    ServerApplication server("", CFG_STR_R);
    auto              test = std::make_shared<TestEngine>();
    server.addEventengine(test);
    server.run(argc, argv);
    return 0;
}